<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>词多多代理商平台</title>
    <include file="Index:header"/>
    <script type="text/javascript" src="__PUBLIC__/js/ZeroClipboard.min.js"></script>
    <!-- 引入 Zero Clipboard 类库 -->

</head>

<body onLoad="init()">    
    <div class="container p30 mt30 ml30" style="width:600px;background-color:#fff">
        <table cellpadding=3 cellspacing=0 width=100% align="center">
            <tr>
                <th colspan="3" style="text-align:center;height:40px;line-height:40px;font-size:14px;">
                    <strong>点击复制按钮可以复制到粘贴板上</strong>
                </th>
            </tr>
            <tr>
                <td align="right">
                    <strong>询盘代码：</strong>
                </td>

                <td style="width:200px;padding:5px">
                    <textarea cols="60" style="padding:10px;" id="fe_text1"></textarea>
                </td>
                
                <td style="padding-left: 10px;width:90px;">
                    <span id="clip_container">
                        <button class="button green" id="clip_button1" data-clipboard-target="fe_text1" name="button">复&nbsp;&nbsp;制</button>
                    </span>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <strong>统计代码：</strong>
                </td>

                <td style="width:200px;padding:5px">
                    <textarea cols="60" style="padding:10px;" id="fe_text2"></textarea>
                </td>

                <td style="padding-left: 10px;width:90px;">
                    <button class="button green" data-clipboard-target="fe_text2" id="clip_button2" name="button">复&nbsp;&nbsp;制</button>
                </td>
            </tr>
        </table>
    </div>
<script type="text/javascript">


        // 定义一个新的复制对象
        var clip = new ZeroClipboard($("#clip_button1"),{
            moviePath: "__PUBLIC__/js/ZeroClipboard.swf"
        } );

        var clip = new ZeroClipboard($("#clip_button2"),{
            moviePath: "__PUBLIC__/js/ZeroClipboard.swf"
        } );

        // 复制内容到剪贴板成功后的操作
        clip.on( 'complete', function(client, args){
            alert("复制成功，复制内容为："+ args.text);
        } );

        $(window).resize(function(){
            clip.reposition();
        });

</script>
</body>

</html>